﻿using System;
using System.Collections.Generic;

using System.Text;

namespace Efficient.Excel
{
    internal class ReaderValueGetterBuilder
    {
        public static IDataReaderValueGetter Build(SimpleType type, string valueList)
        {
            if (string.IsNullOrEmpty(valueList))
            {
                return new DataReaderValueGetter(type);
            }
            switch (type)
            { 
                case SimpleType.Boolean:
                    return new BooleanReaderValueGetter(valueList);
            }
            throw new NotSupportedException(string.Format("不支持类型:{0},预设值为:{1} 的读取器.", type, valueList));
        }
    }
}
